﻿@model Common.Background.WebDepartments
@{
    ViewBag.Title = "Create";
}
@Html.Partial("ContentListTag.Partial", new List<Common.Background.Models.LinkModel> { new Common.Background.Models.LinkModel("建立部门") })

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>部门信息</legend>
        <input type="hidden" id="ParentID" name="ParentID" value="@Request.QueryString["id"]" />
        <input type="hidden" id="DeptLevel" name="DeptLevel" value="@ViewBag.DeptLevel" />

        <div class="editor-label">
            @Html.LabelFor(model => model.DepartmentName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DepartmentName)
            @Html.ValidationMessageFor(model => model.DepartmentName)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.About)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.About)
            @Html.ValidationMessageFor(model => model.About)
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.SortNumber)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.SortNumber)
            @Html.ValidationMessageFor(model => model.SortNumber)
        </div>
    </fieldset>
    @Html.CreateButton("添加", OperatorAuthority.Add)

}